
package DomainModel;
import java.sql.Timestamp;
import java.util.Date;

/**
 *
 * @author PRATAP / Patrick
 */


public class Semester {
    private int semesterId;
    private SemesterType semesterType;
    private int year;
    private int startMonth;
    private int endMonth;
    private int startDay;
    private int endDay;
    private Timestamp semesterStartStamp;
    private Timestamp semesterEndStamp;

    public Semester(int pSemesterId, SemesterType pSemesterType, int pYear, int pStartMonth, int pEndMonth, int pStartDay, int pEndDay) {
        this.semesterId = pSemesterId;
        this.semesterType = pSemesterType;
        this.year = pYear;
        this.startMonth = pStartMonth;
        this.endMonth = pEndMonth;
        this.startDay = pStartDay;
        this.endDay = pEndDay;
    }

    public int getSemesterId() {
      
        return semesterId;
    }

    public void setSemesterId(int semesterId) {
        this.semesterId = semesterId;
    }

    public SemesterType getSemesterType() {
        return semesterType;
    }

    public void setSemesterType(SemesterType semesterType) {
        this.semesterType = semesterType;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getStartMonth() {
        return startMonth;
    }

    public void setStartMonth(int startMonth) {
        this.startMonth = startMonth;
    }

    public int getEndMonth() {
        return endMonth;
    }

    public void setEndMonth(int endMonth) {
        this.endMonth = endMonth;
    }

    public int getStartDay() {
        return startDay;
    }

    public void setStartDay(int startDay) {
        this.startDay = startDay;
    }

    public int getEndDay() {
        return endDay;
    }

    public void setEndDay(int endDay) {
        this.endDay = endDay;
    }

        public Date getSemesterStartDate() {
        return new Date(year,startMonth,startDay);
    }
    
    public Date getSemesterEndDate() {
        return new Date(year,endMonth,endDay);
    }
    
    
    public Timestamp getSemesterStartStamp() {
        Date date = getSemesterStartDate();
        return new Timestamp(date.getTime());
    }
    
    public Timestamp getSemesterEndStamp() {
        Date date = getSemesterEndDate();
        return new Timestamp(date.getTime());
    }
    


}
 

